package com.yztc.yidoutang.fragment.jingxuan_fragment;

import com.yztc.yidoutang.bean.JingXuanBean;
import com.yztc.yidoutang.bean.JingXuanListBean;

import java.util.List;

/**
 * Created by My on 2016/10/17.
 */

public class JingXuanPresenter implements JingXuanContract.Presenter {
    private JingXuanContract.Model model;
    private JingXuanContract.View view;

    public JingXuanPresenter(JingXuanContract.View view) {
        this.view = view;
        this.model=new JingXuanModel();
    }

    @Override
    public void getDataForNet() {
        model.getJingXuanData(new JingXuanContract.OnLoadJingXuanListener() {
            @Override
            public void onSuccess(JingXuanBean listBean) {
                List<JingXuanListBean> list=listBean.getData().getRecommend();
                view.onJingXuanSuccess(list);
            }
            @Override
            public void onFail(Exception e) {

            }

        });
    }
}
